package com.oj.auth.entity;

import com.oj.api.auth.domain.ForgetInfo;
import com.oj.api.auth.domain.HomeResourceInfo;
import com.oj.common.data.BaseEntity;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * 主页资源实体-比如图片和文件
 * Created by hu on 2018/5/11.
 */
@Entity(name = "AUTH_HOME_RESOURCE")
@Table(indexes = {
        @Index(name = "auth_idx_code_home_resource", columnList = "code")
})
@Getter
@Setter
@NoArgsConstructor
@ToString
public class HomeResourceEntity extends BaseEntity<HomeResourceInfo> {

    /**
     * url和描述
     */
    private String url,introduce;
    /**
     * type表示资源类型，0图片，1其它
     */
    private Integer type;
    //表示是否被删除，0表示删除，1表示可用
    String[] statusNames = {"已删除","可用"};

    @Override
    protected HomeResourceInfo createInfo() {
        return new HomeResourceInfo();
    }
}
